// TOWN DIALOGUE SCRIPT
//    Town 48: Friendly, Happy Spiders

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 1;
	text1 = "Hi!";
	text2 = "I'm friendly!";
	text3 = "Don't eat our roaches!";
	text4 = "We need more bugs!";
	text5 = "Don't tell humans we're here!";
	text6 = "We're hiding down here.";
	text7 = "This is our home!";
	text8 = "I really like you!";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,8));
	break;

// Spider

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Spider";
	text1 = "You meet an elder spider. Its many brown hairs are shot through with spiky strands of gray. It wears a gold circlet around its head, delicately balanced above its many eyes.";
	text2 = "_I'm Spider,_ it says. Its high-pitched voice bears the tiniest bit of gravelly authority.";
	text5 = "The chief Spider watches you regally. Its dignity enables it to only occasionally rub affectionately against your legs.";
	text6 = "Its gold circlet occasionally slips down over its eyes. When it happens, it pushes the circlet up again with a pedipalp.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What sort of spider are you?_";
	text1 = "_I'm a leader spider!_ it says.";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_How do you lead the other spiders?_";
	text1 = "_I guided all the other spiders on the big, nasty journey to the surface! I lead them in the catching of yummy bugs. And I say what we should do about those nasty cockroaches._";
	text3 = "_I guided all the other spiders on the big, nasty journey to the surface! I lead them in the catching of yummy bugs. And I said what we should do about those nasty cockroaches, when there was still lots of them to eat._";
	action = DEP_ON_SDF 307 5 0;

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_Why did you leave?_";
	text1 = "_We used to all live down in the weird, dark, chilly caves. You humans called them Avernum. The bugs there were small and not very tasty. Then we found a way up here!_ It gives a happy little jump up and down. _Now we find lots more bugs!_";

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_What kinds of bugs do you eat?_";
	text1 = "_Tasty ones of course._ It plucks a paralyzed, fist-sized cockroach from a nearby web and sucks out its innards. _Yum! Snacks!_";

begintalknode;
	state = 3;
	nextstate = 5;
	condition = gf(307,5) == 0;
	question = "_Do you know anything about the nasty cockroaches?_";
	text1 = "_Cockroaches are good food, but also tough and hard to hunt. But not all are bad! There's some friendly roaches! They live to the north, but are all hidden. Would you like to know where the friendly roaches are?_";

begintalknode;
	state = 5;
	nextstate = -1;
	question = "_Yes. Where are the friendly roaches?_";
	code =
		run_hardcode(133);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(255,9) == 2;
	question = "_I helped fight the nasty roaches like you asked._";
	code =
		run_hardcode(133);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(255,9) == 3;
	question = "_We didn't help the other spiders fight the nasty roaches. The fight seemed too difficult._";
	code =
		run_hardcode(133);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(255,9) == 1;
	question = "_Where was that friendly roach lair?";
	code =
		run_hardcode(133);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(307,5) >= 1;
	question = "_Guess what! I got rid of the roach plague for you._";
	text1 = "_Oh._ It looks very sad. _That makes me sad. You made us have lots less food. I am very, very sad now._ It walks away to sulk.";
	action = END_TALK;

begintalknode;
	state = 1;
	nextstate = -1;
	question = "_This is ... uhh ... a nice home you have here._";
	text1 = "_No it isn't. It's icky and cold and sad. We wouldn't live in this yucky place if we didn't have to stay away from the humans who always want to kill us. But it's still better than the Avernum caves. We hated those caves a lot._";

// Spider

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Spider";
	text1 = "You see a spider marching around, looking for something. When it sees you, it gleefully runs up to you. _My name is Spider,_ it says. Then it resumes its search.";
	text5 = "Spider continues to march around, looking for something.";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What are you looking for?_";
	text1 = "_I'm hunting for yummy roaches! Mmmmm!_";

begintalknode;
	state = 30;
	nextstate = -1;
	question = "_Having much luck hunting?_";
	text1 = "_Yeah!_ it says perkily. It opens its mouth, revealing massive fangs. _For roaches! They're tasty!_ Its voice is unrelentingly bright and high-pitched.";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_There are roaches in here?_";
	text1 = "_Yeah! We raise them. In pens._";

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_Where are your pens?_";
	text1 = "It points a pedipalp to the northeast. _There's a bunch of them back there. When they come out, we paralyze them and suck them dry. It's fun! You should try it!_";
	text2 = "It thinks for a moment, then adds, _You're cute!_";

begintalknode;
	state = 32;
	nextstate = -1;
	question = "_Umm, thanks._";
	text1 = "It moves its pedipalps about excitedly. _Yup!_ It turns and resumes its relentless hunt.";
	action = END_TALK;
	
begintalknode;
	state = 32;
	nextstate = -1;
	question = "_We don't like to eat roaches._";
	text1 = "_You're silly. People are silly. Well, don't kill our roaches unless you have to. They're our tasty food._";
	text2 = "Its point made, it turns and resumes its relentless hunt.";
	action = END_TALK;

// Spider

begintalknode;
	tag = 80;
	state = -1;
	nextstate = 57;
	question = "Spider";
	text1 = "An officious, bold spider blocks your way. It doesn't want to let you go east. _My name is Spider,_ it says somberly.";
	text5 = "The guard spider continues to block your way. It doesn't want to let you go east.";
	action = INTRO;

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_Can I go further?_";
	text1 = "_No, I'm a guardian arachnid!_ it says in a proud way and shows its fangs to punctuate the point.";

begintalknode;
	state = 58;
	nextstate = 59;
	question = "_What are you guarding?_";
	text1 = "_I'm guarding our chief! You can't go east until you prove you're allowed!_";

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_Do you like your chief?_";
	text1 = "_He's powerful and good! I will protect him, even until it's not convenient!_";

begintalknode;
	state = 59;
	nextstate = 60;
	question = "_How can I prove that I am allowed to see your chief?_";
	text1 = "It thinks, unsure for the moment how you would prove you can go to the east. Finally, it says, _If you are allowed to see our chief, surely you would know his name! What is it?_";

begintalknode;
	state = 60;
	nextstate = -1;
	question = "_Is your chief's name Spider?_";
	text1 = "It jumps up and down happily. _That's it! That's Chief Spider's name! You can go through._ ";
	text2 = "The spider wanders off, looking for bugs.";
	action = END_TALK;
	code =
		sf(48,13,1);
		erase_char(4806);
	break;

// Spider

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 85;
	question = "Spider";
	text1 = "You meet a large spider with big fangs, standing guard behind the gate. It doesn't seem ready to attack you. It's just standing there, watching you with interest.";
	text2 = "_I'm Spider! You look friendly, so I won't bite you._ ";
	text5 = "The large spider with big fangs continues to stand guard. _Hi!_ it says again. Its cheery, high-pitched voice seems to come from somewhere below its pedipalps.";
	action = INTRO;

begintalknode;
	state = 85;
	nextstate = 86;
	question = "_What are you guarding?_";
	text1 = "_I'm guarding our lair! There's mean things about._ It makes a little martial leap in the air, to convince you of its fearsomeness.";

begintalknode;
	state = 86;
	nextstate = 87;
	question = "_Why do you need a guard?_";
	text1 = "_You never know when someone mean and bad will try to break in, like some of those cockroaches, or nasty humans._";

begintalknode;
	state = 86;
	nextstate = 87;
	question = "_What sorts of mean things?_";
	text1 = "_There are many mean things about. Dumb spiders who try to eat us. Nasty humans. And cockroaches find us yummy, just like we think they're way tasty!_";

begintalknode;
	state = 87;
	nextstate = 88;
	question = "_I'm sorry that some humans are nasty to you._";
	text1 = "It shakes its head sadly. _Oh well. There are nasty spiders too. Some humans don't like spiders. Silly, huh? We're so good at killing roaches!_";

begintalknode;
	state = 88;
	nextstate = -1;
	condition = gf(307,5) == 0;
	question = "_Do you know anything about all the roaches around outside?_";
	text1 = "_Roaches are mostly yummy food, but some are smart and friendly like us! They are hiding to the north. You should go meet them! They're swell!_";
	text2 = "_Our chief knows exactly where they are. He's in a room that way._ The spider points north. _He can tell you lots about roaches._ The spider goes back to its guarding.";
	action = END_TALK;

// Spider

begintalknode;
	tag = 120;
	state = -1;
	nextstate = 113;
	question = "Spider";
	text1 = "An official looking spider is marching around, walking a precise line back and forth in the middle of the cave.";
	text2 = "The arachnid comes up to your waist and wields huge, venomous fangs. It looks as if it could be a real threat, were it not for an incredible, almost mindless friendliness and optimism. _I'm called Spider,_ it says perkily.";
	text5 = "The official looking spider is still marching back and forth, moving its eight legs in a smooth, precise pattern. It speaks as it marches. _What else would you like to know, cutie?_";
	action = INTRO;

begintalknode;
	state = 113;
	nextstate = -1;
	question = "_Do you know anything about these ruins? Do you know who lived here?_";
	text1 = "_Nope! No clue. They were all gone when we got here. We hate these caves. They're icky. But they keep us hidden from the humans._";

begintalknode;
	state = 113;
	nextstate = 114;
	question = "_May I ask what your responsibilities are?_";
	text1 = "_I'm the captain spider._ It looks you over. _You're cute!_";

begintalknode;
	state = 114;
	nextstate = 116;
	question = "_How did you become captain?_";
	text1 = "It looks uninterested in discussing it. _The chief picked me._ It returns to the subject it's most interested in. _You're really cute!_";

begintalknode;
	state = 116;
	nextstate = 114;
	question = "_Can I speak with the chief?_";
	text1 = "_Yeah. Chief Spider knows lots and lots and lots and lots of stuff about roaches. He is to the north! Oh, and you're cute!_";

begintalknode;
	state = 114;
	nextstate = 115;
	question = "_Umm, you're pretty cute yourself._";
	text1 = "_Yeah!_ It says, bouncing up and down a little. _Want to go on a date?_";

begintalknode;
	state = 115;
	nextstate = -1;
	question = "_Thank you but no. I am, umm, very busy._";
	text1 = "You decline politely. It looks sad, then brightens up. _OK! But if you change your mind, I'll be here. If you can't find me, ask where Spider is!_ It walks off.";
	action = END_TALK;

begintalknode;
	state = 115;
	nextstate = -1;
	question = "_That sounds ... uhh ... nice. Maybe when I'm through with my giant adventure._";
	text1 = "_Hooray! Hooray!_ It jumps up and down happily for about a minute. Then it forgets what you were talking about. Then it walks off.";
	action = END_TALK;

// Spider

begintalknode;
	tag = 140;
	state = -1;
	nextstate = 141;
	question = "Spider";
	text1 = "You meet a giant spider. It rests at the base of this rotting pillar, lost in thought. The hair on its legs are white and spiky. It must be old.";
	text2 = "_Hello, outsider. My name is Spider,_ it says. Despite its age, it still has the bright, chirpy voice of the younger spider.";
	text5 = "Spider still stares off into space with its beady eyes, lost in thought. It doesn't have the spring in its legs that most of the younger spiders do.";
	action = INTRO;

begintalknode;
	state = 141;
	nextstate = -1;
	question = "_You look old._";
	text1 = "_You're rude! And mean!_ It stomps off in a huff. After a minute, it looks like it has forgot your brief conversation entirely.";
	action = END_TALK;

begintalknode;
	state = 141;
	nextstate = 142;
	question = "_You seem lost in thought._";
	text1 = "_I'm a sage spider! I record the history of our people!_";

begintalknode;
	state = 142;
	nextstate = -1;
	question = "_What does a sage spider do?_";
	text1 = "_I have lots of cool learning and stuff. I record history mainly. When I'm not eating yummy bugs._";

begintalknode;
	state = 142;
	nextstate = 143;
	question = "_What sorts of history have you recorded recently?_";
	text1 = "_Would you like to hear about the great journey, or about what we did otherwise, or about the great spider god, or about the tale of the great adventurers?_";

begintalknode;
	state = 143;
	nextstate = -1;
	question = "_Tell me of the great journey._";
	text1 = "It hops up and down and clears its throat. _The history of the Great Journey,_ it begins. _We were in the deep, deep caves. Then Chief Spider led us here. Now we have more bugs. Yay!_";
	text2 = "_Thus endeth the history._";

begintalknode;
	state = 143;
	nextstate = -1;
	question = "_Tell me about other spider history._";
	text1 = "It hops up and down and clears its throat. _The history of the Great Journey,_ it begins. _We ate a lot of bugs and they were good. Then we had babies and ate more bugs and they ate bugs._ It takes him a moment to remember the last part of the story: _Yayyy!_";
	text2 = "_Thus endeth the history._";

begintalknode;
	state = 143;
	nextstate = -1;
	question = "_What about the great spider god?_";
	text1 = "_Uhh... I forget that one. I think we have one, though. Ask me another._";

begintalknode;
	state = 143;
	nextstate = 194;
	question = "_What about the adventurers?_";
	text1 = "_Well, once, long ago, I met some adventurers who came to our caves in ... uhhh ... I think you'd call it Avernum. I was tiny then. Then, years later, I met some more adventurers. I wasn't tiny that time._";
	text2 = "_I liked them all. They were cute. And they helped us._";

begintalknode;
	state = 194;
	nextstate = -1;
	question = "_How?_";
	text1 = "_I forget._ Spider is starting to get tired out. It forgets that it's talking to you.";
	action = END_TALK;

// Spider

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 169;
	question = "Spider";
	text1 = "This giant spider is busily shepherding about three dozen baby spiders, each about the size of a puppy. The babies are a constant source of idle, chirpy chatter. The nanny spider says, _My name is Spider!_";
	text5 = "Spider continues to shepherd around the three dozen baby spiders. Occasionally, she pulls one of her stray charges back to the group with a foreleg.";
	action = INTRO;

begintalknode;
	state = 169;
	nextstate = 170;
	question = "_Are these all your children?_";
	text1 = "_No, silly. I'm a nanny spider,_ it says, in a voice which isn't as cheery as usual for her kind.";

begintalknode;
	state = 170;
	nextstate = 171;
	question = "_What is a nanny?_";
	text1 = "It's sort of hard to hear what it says, over all the baby spiders asking who you are and whether they should eat you or not. _I look after the little babies._";

begintalknode;
	state = 171;
	nextstate = -1;
	question = "_They are very cute._";
	text1 = "One of the babies gets caught in some of its own webbing and the nanny has to free it. Then she says _Yes. Real cute. Real, real cute._ She sighs. ";
	text2 = "_They'll be big, fierce, happy spiders someday. But for now they need to be looked after._ She leads them off before you step on any of them.";
	action = END_TALK;

// Spider

begintalknode;
	tag = 180;
	state = -1;
	nextstate = 197;
	question = "Spider";
	text1 = "A giant spider runs up and kisses you on the knee. Then it backs away shyly. _I'm Spider,_ it says, pleased that you are talking to it. _I'm so glad to see you!_";
	text5 = "Spider watches you shyly. It is very happy to have you around. You start to feel that you were more comfortable with giant spiders that just try to attack you. _I'm so glad to be talking to you!_";
	action = INTRO;

begintalknode;
	state = 197;
	nextstate = 198;
	question = "_Ummm ... you must have me confused with someone else._";
	text1 = "_Nope. I'm looking for a mate!_ it says exuberantly.";

begintalknode;
	state = 198;
	nextstate = 199;
	question = "_Why do you want a mate?_";
	text1 = "It shies away, and, if it was capable, you would think it's blushing. _It's good to make baby spiders, and you're cute!_";

begintalknode;
	state = 199;
	nextstate = -1;
	question = "_What would you do with baby spiders?_";
	text1 = "_Well ..._ it says. _I want a bunch of nice baby spiders. A bunch of them to teach, and nourish, and not devour, and suck bug juices with. I'll have a brood someday! I'm sure of it!_ It bounces happily at the prospect.";

begintalknode;
	state = 199;
	nextstate = -1;
	question = "_I'm flattered but ..._ (Let it down nicely.)";
	text1 = "_No, but ... You're cute and tall! I like you!_ You sit down, and patiently explain that you would make very poor parents for baby spiders. It understands and walks sadly away.";
	action = END_TALK;

begintalknode;
	state = 199;
	nextstate = -1;
	question = "_Ugh! Get away! Get away! Get away!_";
	text1 = "_Hmmph. You could have been polite about it._ Disappointed, it walks off.";
	action = END_TALK;

begintalknode;
	state = 198;
	nextstate = -1;
	question = "_Ugh!_ (Run away.)";
	text1 = "It chases you, but you're much faster.";
	action = END_TALK;

// Spider

begintalknode;
	tag = 200;
	state = -1;
	nextstate = 225;
	question = "Spider";
	text1 = "A baby spider, only about a foot high, watches you. _I'm ... ummm ..._ it thinks. _Spider! That's it! Spider!_";
	text5 = "The baby spider watches you with extreme interest. ";
	action = INTRO;

begintalknode;
	state = 225;
	nextstate = 226;
	question = "_Hello, little one. What are you doing?_";
	text1 = "_Well, I'm just growing. But someday, I'll be huge and fierce!_";

begintalknode;
	state = 226;
	nextstate = -1;
	question = "_How big will you grow?_";
	text1 = "_I'm bigger than all but four of my thirty brothers and sisters! I'm gonna be real fierce!_";

begintalknode;
	state = 226;
	nextstate = 227;
	question = "_What will you do when you are huge and fierce?_";
	text1 = "_Then I will devour bugs utterly!_";

begintalknode;
	state = 227;
	nextstate = -1;
	question = "_Good luck devouring bugs utterly._";
	text1 = "_Yeah!_ It tries to make a fierce striking motion, but only succeeds in getting its legs tangled up. When it straightens out, it says, _Not yet. But soon!_ It pounces off.";
	action = END_TALK;

